import { useEffect, useRef, useState } from 'react';

const usePlayerState = (videoInfo) => {
  const playerRef = useRef();
  useEffect(() => {
    playerRef.current?.create();
  }, [videoInfo]);

  return {
    playerRef,
  };
};

export default usePlayerState;
